const add = async(
    server,
    name,
    code,
    shortcut
) => {

    return await server
        .post('/stock')
        //.set('Authorization', `Bearer ${token}`)
        .send({
            name,
            code,
            shortcut
        });
}

const get = async(
    server,
    id
) => {

    return await server
        .get('/stock/' + id)
        //.set('Authorization', `Bearer ${token}`)
        .send();
}

const update = async(
    server,
    id,
    summary,
) => {

    return await server
        .put('/stock/' + id)
        //.set('Authorization', `Bearer ${token}`)
        .send({
            summary
        });
}

module.exports = {
    add,
    get,
    update
};